<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<title>注册</title>
		<link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="css/index.css"/>
		<script src="js/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="bg">
			<div class="reg">
				<div class="phone">
					<label class="pic_phone">
						<img src="img/phone.png"/>
					</label>
					<input class="in_phone" type="number" placeholder="请输入手机号码"/>
				</div>
				<!--<div class="phone" style="margin-top:0.28rem;">
					<label class="codeImg">
						<img src="img/code.png"/>
					</label>
					<input class="in_password" type="password" placeholder="请输入密码"/>
				</div>
				<div class="phone" style="margin-top:0.28rem;">
					<label class="codeImg">
						<img src="img/code.png"/>
					</label>
					<input class="confirm_password" type="password" placeholder="请确认密码"/>
				</div>-->
				<div class="phone_code">
					<div class="pic_code_left">
						<label class="codeImg">
							<img src="img/code.png"/>
						</label>
						<input class="in_left" type="number" placeholder="请输入验证码"/>
					</div>
					<div class="pic_code_right">
						<button class="code">获取验证码</button>
					</div>
				</div>
			</div>
			<div class="register_button">立即注册</div>
			<div class="notice">
				<span>阅读并同意</span>
				<span style="color: #FFE1A5;">《用户注册协议》</span>
			</div>

			<div class="downNow">立即下载APP</div>

			<div class="mask" style="display: none;position: absolute;top: 0;"></div>


		</div>
	</body>
	<script src="js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
	<script src="js/index.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
    function is_weixn_qq(){
      var ua = navigator.userAgent.toLowerCase();
      if(ua.match(/MicroMessenger\/[0-9]/i)){
        return "weixin";
      }
      if(ua.match(/QQ\/[0-9]/i)){
        return "QQ";
      }
      return false;
    }


      document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
      $(".bg").height($(window).height())
      $(".mask").height($(window).height())

      var encrypt='';

      var publicUrl='http://zyd.o362.com/'
      var downLink='https://www.dongxugj.com/go/nIvA7v'

      $.ajax({
        type:"get",
        data:{
          encrypt:getQueryString("encrypt")
        },
        url: publicUrl + "/ApplyController/channelDrainage",
        success:function(res){
          if(res != ""){
            encrypt=res.encrypt;
            publicUrl=res.publicUrl;
            downLink=res.downLink;
            $.ajax({
              type:"post",
              url:res.publicUrl+"StatisticsDataController/saveChannelClick",
              data:{
                encrypt:encrypt
              },
            });
          }else{
            encrypt=getQueryString("encrypt");
            $.ajax({
              type:"post",
              url:publicUrl+"StatisticsDataController/saveChannelClick",
              data:{
                encrypt:encrypt
              },
            });
          }
        },
      });

      $(".code").click(function(){
        let phone=$(".in_phone").val();
        let params = {
          userAppPhone: phone,
          encrypt: encrypt,
          type: 1,
        }
        ajaxRequest(publicUrl+'deskManagementController/channelSms', params, function(data) {
          if(data.state == 1) {
            mui.toast("获取成功");
            $(".in_left").val(data.info.code);
          }
        });
      })

      $(".register_button").click(function(){
        let phone=$(".in_phone").val();
        let code=$(".in_left").val();
        let params = {
          userAppPhone:phone,
          encrypt:encrypt,
          password:'',
          msgCode:code,
          ip:returnCitySN["cip"],
        }
        ajaxRequest(publicUrl+'deskManagementController/register', params, function(data) {
          if(data.state==1){
            window.location.href =publicUrl+'down_load.html'
          }
        });
      })

      $('.downNow').click(function(){
        var u = navigator.userAgent, app = navigator.appVersion;
        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
        var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
        if (isAndroid) {
          $(".android").show()
          window.location.href = downLink
        }
        if (isIOS) {
          $(".ios").show()
          window.location.href = downLink
        }
      })


	</script>
</html>
